<?php
error_reporting(0);
session_start();
include_once '../comm/config.php';
include '../comm/checkpostandget.php';
include 'check.php';
include_once '../comm/wjt.php';

$yzm=$_POST['yzm']; $jyh=$_POST["jyh"]; if($yzm==""||$yzm!=$_SESSION["code"])
{
	$msg="交易号提交失败！验证码错误，请返回重新提交！ <a href=\"addjyh.php\" class=\"redlink\">返回上一页</a>";
}
else
{	
	$link = mysql_connect($dbserver, $dbuser, $dbpass);
	if (!$link) {
		die(ERR_DB);
	}
	else
	{
		mysql_query("set names utf8");
		$sql="select * from ".$BIAOTOU."tbjy where tbcode='".$jyh."'";
		mysql_select_db($dbname);
		$rs = mysql_query($sql);
		$total2 = mysql_num_rows($rs);
		
		if($total2==0)
		{
			$sj= date("Y-m-d H:i:s");  
			$sql="insert into ".$BIAOTOU."tbjy (tbcode,addtime,jystate,ddusername) values ('".$jyh."','$sj',0,'".$_SESSION["duoduouser"]."')";
			$rs = mysql_query($sql);
			$msg="交易号提交成功！该交易号在您交易完成并付款24小时内将自动完成返现！  <a href=\"addjyh.php\" class=\"redlink\">继续提交交易号</a>";
		}
		else
		{
			$msg="交易号提交失败，该交易号已经存在，请不要重复提交！ <a href=\"addjyh.php\" class=\"redlink\">继续提交交易号</a>";
		}
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>提交交易号成功 - 用户中心</title>
<link href="../css/usercss.css" rel="stylesheet" type="text/css">
<link href="../template/<?=MOBAN?>/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jquery.js"></script>
<style type="text/css">
<!--
.STYLE4 {color: #FF3300; font-weight: bold; }
.STYLE5 {color: #0099FF}
-->
</style>
</head>

<body>
<?php
include("../template/".MOBAN."/header.tpl.php");
?>
<?php
include("../template/".MOBAN."/nav.tpl.php");
?>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17%" height="50"><img src="../images/logo.png" width="180" height="50" /></td>
    <td width="83%" valign="bottom"><table height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td rowspan="3" width="1" align="center" bgcolor="#999999"></td>
        <td width="80" height="1" align="center" bgcolor="#999999"></td>
        <td rowspan="3" width="1" align="center" bgcolor="#999999"></td>
        <td width="1" rowspan="3" align="center"></td>
        <td width="20" align="center"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
        <td width="80" align="center" height="1" bgcolor="#999999"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
        <td width="20" align="center"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
        <td width="80" align="center" height="1" bgcolor="#999999"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
        <td width="20" align="center"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
        <td width="0" height="1" align="center" bgcolor="#999999"></td>
        <td width="0" height="1" align="center"></td>
        <td width="80" height="1" align="center" bgcolor="#999999"></td>
        <td width="1" rowspan="3" align="center" bgcolor="#999999"></td>
      </tr>
      <tr>
        <td height="23" align="center" bgcolor="#FFFFFF" width="80"><a href="center.php">我的交易</a></td>
        <td width="20" align="center"></td>
        <td height="23" align="center" bgcolor="#FFFFFF" width="80"><a href="tradelist.php">确认交易</a></td>
        <td width="20" align="center"></td>
        <td width="80" align="center" bgcolor="#FFFFFF"><a href="mingxilist.php">账户明细</a></td>
        <td width="20" align="center"></td>
        <td width="80" height="22" align="center" bgcolor="#FFFFFF"><a href="tuiguang.php">推广计划</a><a href="info.php"></a></td>
        <td width="20" align="center">&nbsp;</td>
        <td width="80" align="center" bgcolor="#FFFFFF"><a href="info.php">用户信息</a></td>
      </tr>
      <tr>
        <td height="1" align="center" bgcolor="#999999" width="80"></td>
        <td width="20" align="center" bgcolor="#999999"></td>
        <td height="1" align="center" bgcolor="#ffffff" width="80"></td>
        <td align="center" bgcolor="#999999"></td>
        <td width="80" align="center" bgcolor="#999999"></td>
        <td width="20" height="1" align="center" bgcolor="#999999"></td>
        <td width="0" height="1" align="center" bgcolor="#999999"></td>
        <td width="0" height="1" align="center" bgcolor="#999999"></td>
        <td width="80" height="1" align="center" bgcolor="#999999"></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="289" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="51"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="5"></td>
          </tr>
        </table>
          <table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="50" colspan="2"><?php
include("left.php");
?></td>
          </tr>
          <tr>
            <td width="493" height="25"><img src="../images/tips.gif" alt="等待确认" width="14" height="14" align="absmiddle" /><strong>完成提交淘宝交易号：</strong></td>
            <td width="491" align="right">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="311" valign="top"><table width="980" border=1 align="center" cellpadding=0 cellspacing=0 bordercolor="#dddddd"
style="border-collapse: collapse">
                    
                    <tr>
                      <td width="100%" height="257" align="center">
                        <table width="563" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td height="60" colspan="2"><?php echo $msg;?></td>
                          </tr>
                      </table>
                      </td>
                    </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<?php
include("../template/".MOBAN."/footer.tpl.php");
?>
</body>
</html>